from enum import Enum
 #开盘啦api地址
kaipanlalhbApiAddress= 'https://applhb.longhuvip.com/w1/api/index.php'
kaipanlaApiAddress= 'https://apphq.longhuvip.com/w1/api/index.php'
xugubaoApiAddress = "https://flash-api.xuangubao.cn/api"
xugubaoRealApiAddress = 'https://api-ddc-wscn.xuangubao.cn/market'
dfcfApiAddress = 'https://push2.eastmoney.com/api'

#常量accessibleName
YQSZ='YQSZ'
LHB='LHB'
BKXGG='BKXGG'
MRFP='MRFP'
ZPJJZ='ZPJJZ'
ZPJJZBUT='ZPJJZ_button'
ZPJJZBUTLB='ZPJJZLB_button'
TABBK ='tableWidget_bk'
TABBKSUB ='tableWidget_bk_sub'
TABBKLABEL ='tableWidget_bk_label'
PUSHBUTTONSETBZ='pushButton_set_bz'
PUSHBUTTONSETBZTEST='pushButton_set_bz_test'
PUSHBUTTONSETBZONE='pushButton_set_bz_1'
PUSHBUTTONSETBZNINE='pushButton_set_bz_9'
PUSHBUTTONSETBZTWO='pushButton_set_bz_2'
PUSHBUTTONSETBZSEVEN='pushButton_set_bz_7'

ST='ST'
SZ='.SZ'
SS='.SS'

#job任务区分
PZBK = 'PZBK'
PZBKXGG = 'PZBKXGG'

#config字段
XOFF = 'XOff'
YOFF = 'YOff'
Y2OFF = 'Y2Off'
LINECHARTNUM='LineChartNum'
BZ = 'BZ'
BZONE = 'BZ1'
BZNINE = 'BZ9'
INTERVAL = 'INTERVAL'
BZSPEED = 'BZSPEED'
BKLDISCHECK='BKLDISCHECK'


#json文件地址
jsonfileaddr='/data/bklddata.json'
hreadfileaddr='/data/headdata.json'
dayexpectfileaddr='/data/dayexpect.json'
lhbdatafileaddr='/data/lhbdata.json'
platepopdataaddr='data/platepopdata.json'
configfileaddr='/config/config.json'
pngfileaddr='/config/screenshot.png'
lineChartfileaddr = '/config/emotionLineChart.html'
JHFG=' + '
SXFG=' | '
FHFG=' ; '

BJGP='标记股票'
class BJGPEnum(Enum):
    one = (1,'标记1')
    two = (2, '标记2')
    three = (3, '标记3')
    four = (4, '标记4')
    five = (5, '标记5')
    six = (6, '标记6')
    seven = (7, '标记7')
    eight = (8, '标记8')
    nine = (9, '标记9')

    @classmethod
    def value_by_another_value(cls, value):
        for member in cls:
            if member.value[0] == value:
                return member.value[1]
        return None

class dayexpectEnum(Enum):
    one = (1, '不及预期')
    two = (2, '一般预期')
    three = (3, '高预期')
    four = (4, '超预期')

    @classmethod
    def value_by_another_value(cls, num):
        for member in cls:
            if member.value[0] == num:
                return member.value[1]
        return None

